<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>流程实例历史任务</title>
    <#include '../include/common.html'/>
    <script type="text/javascript" src="<@s.url '/resources/process/js/instanceHistory.js'/>"></script>
</head>
<body>
<button class="layui-btn" title="返回" onclick="javascript:window.history.back();"><i class="layui-icon">&#xe65c;</i>返回</button>
<br>
<img src="<@s.url '/process/graph.htm?processInstanceId='/>${processInstanceId}"/>
<table class="layui-table">
    <thead>
    <tr>
        <th>TaskId</th>
        <th>ProcessDefinitionId</th>
        <th>ProcessInstanceId</th>
        <th>ExecutionId</th>
        <th>activityName</th>
        <th>assignee</th>
        <th>startTime</th>
        <th>endTime</th>
        <th>processDefinitionVersion</th>
        <th width="10px">操作</th>
    </tr>
    </thead>
    <tbody>
    <#if historys??>
        <#list historys as t>
            <tr>
                <td>${t.taskId!}</td>
                <td>${t.processDefinitionId!}</td>
                <td>${t.processInstanceId!}</td>
                <td>${t.executionId!}</td>
                <td>${t.activityName!}</td>
                <td>${t.assignee!}</td>
                <td>${(t.startTime?datetime)!}</td>
                <td>${(t.endTime?datetime)!}</td>
                <td>${t.processDefinitionVersion!}</td>
                <td>
                    <#if !t.endTime??>
                        <div class="layui-btn-group">
                            <button class="layui-btn layui-btn-mini" onclick="completeTask('${t.taskId}')">完成</button>
                        </div>
                    </#if>

                </td>
            </tr>
        </#list>
    </#if>
    </tbody>
</table>
</body>
</html>